package com.biscuit.page.basicservice.api;

import com.biscuit.common.base.BaseModelResponse;
import com.biscuit.common.base.BaseResponse;
import com.biscuit.common.base.BaseResponseVoid;
import com.biscuit.page.basicservice.api.model.request.user.*;
import com.biscuit.page.basicservice.api.model.response.user.UserInfoAResp;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author biscuit
 * @createTime 2024/6/25 8:50
 */
@Api(tags = "用户相关接口")
@RequestMapping("/user")
public interface IUserRemote {

    @PostMapping("/getUserInfo")
    @ApiOperation(value = "根据用户Id获取用户信息")
    BaseResponse<UserInfoAResp> getUserInfo(@RequestBody UserIdAReq req);

    @ApiOperation(value = "重置用户密码为默认密码")
    @PostMapping("/reset/password/default")
    BaseResponse<BaseResponseVoid> resetPasswordDefault(@RequestBody UserIdAReq req);

    @ApiOperation(value = "重置用户密码")
    @PostMapping("/reset/password")
    BaseResponse<BaseResponseVoid> resetPassword(@RequestBody UserResetPasswordAReq req);

    @ApiOperation(value = "修改用户信息（头像&昵称）")
    @PutMapping("/updateAvatarAndNickName")
    BaseResponse<BaseResponseVoid> updateAvatarAndNickName(@RequestBody @Validated UserUpdateAvatarAndNickNameAReq req);

    @ApiOperation(value = "修改邮箱")
    @PutMapping("/updateEmail")
    BaseResponse<BaseResponseVoid> updateEmail(@RequestBody @Validated UserUpdateEmailAReq req);

    @ApiOperation(value = "修改手机号")
    @PutMapping("/updateMobile")
    BaseResponse<BaseResponseVoid> updateMobile(@RequestBody @Validated UserUpdateMobileAReq req);

    @ApiOperation(value = "修改邮箱或手机号验证码校验")
    @PostMapping("updateEmailOrMobileVerifyCodeCheck")
    BaseResponse<BaseModelResponse<String>> updateEmailOrMobileVerifyCodeCheck(@RequestBody UserUpdateEmailOrMobileVerifyCodeCheckAReq req);


}
